package com.pactera.miyuangroup.controller.web;

import com.baomidou.mybatisplus.plugins.Page;
import com.pactera.miyuangroup.db.entity.LoginUser;
import com.pactera.miyuangroup.filter.CurrentUser;
import com.pactera.miyuangroup.service.LoginUserService;
import com.pactera.miyuangroup.vo.request.web.TransportReques;
import com.pactera.miyuangroup.vo.response.ResultModel;
import com.pactera.miyuangroup.vo.response.User;
import com.pactera.miyuangroup.vo.response.web.TransportRes;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述:
 *
 * @outhor 张汉卿
 * @create 2018-04-26 10:43
 */

@Api(description = "配送员信息")
@RestController
@RequestMapping("TransportInfo")
@Slf4j
public class TransportController {
    @Autowired
    private LoginUserService loginUserService;


    @ApiOperation(value="配送员信息", notes="配送员信息")
    @RequestMapping(value = "/getTransportInfoList", method = RequestMethod.POST)
    private ResultModel<Page<TransportRes>> getTransportInfoList(@RequestBody TransportReques transportReques, @CurrentUser User user){
        log.info("配送员信息查询");

        Page<TransportRes> TransportList = loginUserService.selectTransportInfoList(transportReques,user.getOrgId());
        return ResultModel.ok(TransportList);
    }
}
